<?php
namespace App\Models;

/*
 * Mock travel destination data.
 * Note that we don't have to extend CodeIgniter's model for now
 */

class Actors {

    //mock data : an array of records
    protected $data = [
        '1' => [
            'id' => 1,
            'name' => 'Tommy Tam',
            'city' => 'Hong Kong',
            'brand film' => 'Shaolin hero',
            'constellation' => 'Leo',
            'film company' =>'no',
            'image' => 'Tommy Tam.png',
        ],
        '2' => [
            'id' => 2,
            'name' => 'Wai-Man Chan',
            'city' => 'Hong Kong',
            'brand film' =>'Cinderella boy',
            'constellation' =>'cancer',
            'film company' =>'Shaw Brothers (Hong Kong) Limited',
            'image' => 'Wai-Man Chan.png',
        ],
        '3' => [
            'id' => 3,
            'name' => 'Anthony Perry',
            'city' => 'Hong Kong',
            'brand film' =>'Beast cops',
            'constellation' =>'virgo',
            'film company' =>'BAIYU ENTERTAINMENT',
            'image' => 'Anthony Perry.png',
        ],
        '4' => [
            'id' => 4,
            'name' => 'Simon Yam',
            'city' => 'Hong Kong',
            'brand film' =>'Echoes Of The Rainbow',
            'constellation' =>'Pisces',
            'film company' =>'Yam Tat Wah Studio',
            'image' => 'Simon Yam.png',
        ],
        '5' => [
            'id' => 5,
            'name' => 'Mark Cheng',
            'city' => 'Hong Kong',
            'brand film' =>'A love of god',
            'constellation' =>'libra',
            'film company' =>'BaiYu Stars',
            'image' => 'Mark Cheng.png',
        ],
    ];

    public function findAll() {
        return $this->data;
    }

    public function find($id = null) {
        if (!empty($id) && isset($this->data[$id])) {
            return $this->data[$id];
        }
        return null;
    }

}
